package MyOop01;

public class Teacher {
    public String name;
    public String major;
    public String curriculum;
    public int teaching;

    public void show(){
        System.out.println(name);
        System.out.println("专业方向："+major);
        System.out.println("教授课程："+curriculum);
        System.out.println("教龄:"+teaching);
    }


    public static void main(String[] args) {
        Teacher teacher = new Teacher();
        teacher.name = "王老师";
        teacher.teaching = 5;
        teacher.major = "计算机";
        teacher.curriculum = "使用java语言理解程序逻辑";

        teacher.show();
    }
}
